package com.ITXu.reggie.commom;

//同一个请求内共享一个线程，通过在threadLocal对当前请求的id进行存储和使用
public class BaseContext {
    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();
    
    public static void setCurrentId(Long id) {
    	threadLocal.set(id);
    } 
    
    public static Long getCurrentId() {
    	return threadLocal.get();
    } 
}
